package cn.stronglink.asset.message.mq.dam.handle;

import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

import cn.stronglink.asset.message.mq.dam.IMessageHandle;
import cn.stronglink.asset.message.mq.dam.message.MQMessageOfDAM;

/**
 * 封装了返回异常信息的抽象处理类
 * @author yuzhantao
 *
 */
public abstract class AbstractReturnExceptionHandle implements IMessageHandle<MQMessageOfDAM> {
	protected final Logger logger = LoggerFactory.getLogger(this.getClass());
	
	/**
	 * 处理消息
	 * @param msg
	 */
	protected abstract void handleMessage(MQMessageOfDAM msg);
	
	@Override
	public void handle(MQMessageOfDAM msg) {
		try {
			this.handleMessage(msg);
		}catch(Exception e) {
			e.printStackTrace();
		}
	}
}
